package com.report.reportserver.service.impl;

import com.report.reportserver.mapper.MajorMapper;
import com.report.reportserver.model.Major;
import com.report.reportserver.service.MajorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ ClassName: MajorServiceImpl
 * @ Description：查询专业以及对应学院
 * @ Modified By：
 * @ Version:
 * @ Author     ：LiYing
 * @ Date       ：Created in 16:22 2022/3/29
 */
@Service
public class MajorServiceImpl implements MajorService {
    @Autowired
    MajorMapper majorMapper;

    @Override
    public Major queryMajorById(Integer id) {
        return majorMapper.selectByPrimaryKey(id);
    }

    @Override
    public Major queryMajorByName(String name) {
        return majorMapper.selectByName(name);
    }

    @Override
    public List<Major> queryMajorByAcademy(String academy) {
        return majorMapper.selectByAcademy(academy);
    }
}
